<template>
	<view class="footer">
		<view>
			<span>合计：</span>
			<p>￥{{price}} <span v-if="discounts">已优惠{{discounts}}元</span></p>
		</view>
		<button @click="skip">提交订单</button>
	</view>
</template>

<script>
	export default {
		name: "footers",
		data() {
			return {

			};
		},
		props:['discounts','url','price'],
		methods:{
			skip(){
				uni.navigateTo({
					url:this.url
				})
			}
		},
		// 下拉刷新
		onPullDownRefresh() {
			uni.stopPullDownRefresh();
		},
	}
</script>

<style lang="less">
	.footer {
		width: 690rpx;
		height: 130rpx;
		position: fixed;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
		border-radius: 20rpx;
		background: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx;
		box-sizing: border-box;

		&>view {
			display: flex;
			font-size: 13px;

			&>p {
				display: flex;
				flex-direction: column;
				align-items: center;
				font-size: 13px;

				&>span {
					font-size: 10px;
					color: #FF4815;
				}
			}
		}

		&>button {
			margin: 0;
			padding: 0;
			width: 180rpx;
			height: 68rpx;
			background: #52C276;
			color: #fff;
			line-height: 68rpx;
		}
	}
</style>